﻿@model IRIS.Models.StaticPage

@{
    ViewBag.Title = "Create";
}

<h2>Ný Síða</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@if (!ViewData.ModelState.IsValid)
{
    <div class="error">
        @Html.ValidationSummary(false)
    </div>
}
@using (Html.BeginForm()) {
    
    <fieldset>
        <legend>Undirsíða</legend>

        <div class="editor-label">
           Titill
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
        </div>

        <div class="editor-label">
           Innihald
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Text)
        </div>

        <p>
            <input type="submit" value="Bæta við Síðu" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
